package com.yjian.dao.mapper;

import com.yjian.dao.bean.User;
import com.yjian.dao.provider.UserProvider;
import org.apache.ibatis.annotations.InsertProvider;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.SelectProvider;

import java.util.List;

/**
 * Created by xuxiaobao on 2017/9/27.
 */
@Mapper
public interface UserMapper {

    @SelectProvider(type = UserProvider.class, method = "getUserByUid")
    User getUserByUid(User user);

    @InsertProvider(type = UserProvider.class, method = "saveUser")
    int saveUser(User user);

    @SelectProvider(type = UserProvider.class, method = "checkUserAndPassword")
    User checkUserAndPassword(User user);

    @SelectProvider(type = UserProvider.class, method = "isExistUserPhone")
    int isExistUserPhone(String phone);

    @SelectProvider(type = UserProvider.class, method = "listUserByUid")
    List<User> listUserByUid(List<String> uids);
}
